package sean.org;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

//如果不配做该对象，就监听不到DemoEvent事件了
@Component
public class DemoListener implements ApplicationListener<DemoEvent>{

	@Override
	public void onApplicationEvent(DemoEvent event) {
		String msg=event.getMsg();
		System.out.println("receive"+msg);
	}

}
